home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3s / gets.z / gets
Encoding:
Text File  |  2002-10-03  |  2.3 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GGGGEEEETTTTSSSS((((3333SSSS))))                                                              GGGGEEEETTTTSSSS((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      gets, fgets - get a string from a stream
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.  
  14.      cccchhhhaaaarrrr ****ggggeeeettttssss ((((cccchhhhaaaarrrr ****ssss))));;;;
  15.  
  16.      cccchhhhaaaarrrr ****ffffggggeeeettttssss ((((cccchhhhaaaarrrr ****ssss,,,, iiiinnnntttt nnnn,,,, FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _g_e_t_s reads characters from the standard input stream, _s_t_d_i_n, into the
  20.      array pointed to by _s, until a new-line character is read or an end-of-
  21.      file condition is encountered.  The new-line character is discarded and
  22.      the string is terminated with a null character.
  23.  
  24.      _f_g_e_t_s reads characters from the _s_t_r_e_a_m into the array pointed to by _s,
  25.      until _n-1 characters are read, or a new-line character is read and
  26.      transferred to _s, or an end-of-file condition is encountered.  The string
  27.      is then terminated with a null character.
  28.  
  29. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  30.      lseek(2), read(2), ferror(3S), fopen(3S), fread(3S), getc(3S), scanf(3S),
  31.      stdio(3S), ungetc(3S).
  32.  
  33. NNNNOOOOTTTTEEEESSSS
  34.      When using _g_e_t_s, if the length of an input line exceeds the size of s,
  35.      indeterminate behavior may result.
  36.  
  37. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  38.      If end-of-file is encountered and no characters have been read, no
  39.      characters are transferred to _s and a NULL pointer is returned.  If a
  40.      read error occurs, such as trying to use these functions on a file that
  41.      has not been opened for reading, a NULL pointer is returned.  Otherwise _s
  42.      is returned.
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.